package net.easyjava.tools.file;


import net.easyjava.tools.BaseEnum;

/**
 * Created by wxnacy on 2015/11/30.
 */
public enum  FileTypeEnum implements BaseEnum {
    /**
     * MP3
     */
    MP3("4944330","mp3"),
    /**
     * JEPG.
     */
    JPEG("FFD8FF","jpg"),

    /**
     * PNG.
     */
    PNG("89504E47","png"),

    /**
     * GIF.
     */
    GIF("47494638","gif"),

    /**
     * TIFF.
     */
    TIFF("49492A00","tiff"),

    /**
     * Windows Bitmap.
     */
    BMP("424D","bmp"),

    /**
     * CAD.
     */
    DWG("41433130","dwg"),

    /**
     * Adobe Photoshop.
     */
    PSD("38425053","psd"),

    /**
     * Rich Text Format.
     */
    RTF("7B5C727466","rif"),

    /**
     * XML.
     */
    XML("3C3F786D6C","xml"),

    /**
     * HTML.
     */
    HTML("68746D6C3E","html"),

    /**
     * Email [thorough only].
     */
    EML("44656C69766572792D646174653A","email"),

    /**
     * Outlook Express.
     */
    DBX("CFAD12FEC5FD746F","dbx"),

    /**
     * Outlook (pst).
     */
    PST("2142444E","pst"),

    /**
     * MS Word/Excel.
     */
    XLS_DOC("D0CF11E0","doc"),

    /**
     * MS Access.
     */
    MDB("5374616E64617264204A","mdb"),

    /**
     * WordPerfect.
     */
    WPD("FF575043","wpd"),

    /**
     * Postscript.
     */
    EPS("252150532D41646F6265","eps"),

    /**
     * Adobe Acrobat.
     */
    PDF("255044462D312E","pdf"),

    /**
     * Quicken.
     */
    QDF("AC9EBD8F","qdf"),

    /**
     * Windows Password.
     */
    PWL("E3828596","pwl"),

    /**
     * ZIP Archive.
     */
    ZIP("504B0304","zip"),

    /**
     * RAR Archive.
     */
    RAR("52617221","rar"),

    /**
     * Wave.
     */
    WAV("57415645","wav"),
    /**
     * MP4
     */
    MP4("0000001","mp4"),

    /**
     * AVI.
     */
    AVI("41564920","avi"),

    /**
     * Real Audio.
     */
    RAM("2E7261FD","ram"),

    /**
     * Real Media.
     */
    RMVB("2E524D46","rmvb"),

    /**
     * MPEG (mpg).
     */
    MPG("000001BA","mpg"),

    /**
     * Quicktime.
     */
    MOV("6D6F6F76","mov"),

    /**
     * Windows Media.
     */
    ASF("3026B2758E66CF11","asf"),

    /**
     * MIDI.
     */
    MID("4D546864","mid");
    ;



    private FileTypeEnum(String key, String value){
        this.key = key;
        this.value = value;
    }
    private String key;//key
    private String value;//value

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public static void main(String[] args) {
        System.out.println("FileTypeEnum.valueOf(\"\") = " + FileTypeEnum.valueOf(FileTypeEnum.MP3+""));
        for(FileTypeEnum fileTypeEnum:FileTypeEnum.values()){
            System.out.println("fileTypeEnum.getName() = " + fileTypeEnum.getKey());
        }
    }
}
